<style type="text/css">
    .item { 
        display: inline-block;
margin-right: 15px;
overflow-x: hidden;
overflow-y: hidden;
padding-bottom: 15px;
width: 315px;
 }
 
 .item .gray_block { 
border-bottom-color: rgb(225, 224, 224);
border-bottom-style: solid;
border-bottom-width: 1px;
border-left-color: rgb(225, 224, 224);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgb(225, 224, 224);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgb(225, 224, 224);
border-top-style: solid;
border-top-width: 1px;
margin-bottom: 0px;
padding-bottom: 7px;
padding-left: 7px;
padding-right: 7px;
padding-top: 7px;

background-color: rgb(241, 241, 241);
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
 }
 
 .tovarpic { 
position: relative;
 }
 a.tovarlink { 
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: url("<?= $url ?>/themes/classic/frontend/images/transp_blue.png");
background-origin: padding-box;
background-position: 0px 0px;
background-repeat: repeat;
background-size: auto;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
color: rgb(255, 255, 255);
display: block;
font-size: 14px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
position: absolute;
text-shadow: 1px 0px 0px;
z-index: 1;
 }
 
a:link, a:visited { 
font-style: normal;
text-decoration: underline;
 }
 .tovarinfo { 
border-bottom-color: rgb(181, 181, 181);
border-bottom-style: dotted;
border-bottom-width: 1px;
height: auto;
margin-bottom: 5px;
margin-left: 0px;
margin-right: 0px;
margin-top: 5px;
overflow-x: hidden;
overflow-y: hidden;
 }
 .tovarinfo1 { 
height: auto;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 5px;
overflow-x: hidden;
overflow-y: hidden;
 }
 .sz11 { 
font-size: 11px;
 }
.gray { 
color: rgb(127, 127, 127);
 }
 
 .sz17 { 
font-size: 17px !important;
 }
 .oranj_btn3 { 
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: url("<?= $url ?>/themes/classic/frontend/images/red_button3.png");
background-origin: padding-box;
background-position: 0px 0px;
background-repeat: no-repeat;
background-size: auto;
border-bottom-color: rgb(255, 255, 255);
border-bottom-style: solid;
border-bottom-width: 0px;
border-left-color: rgb(255, 255, 255);
border-left-style: solid;
border-left-width: 0px;
border-right-color: rgb(255, 255, 255);
border-right-style: solid;
border-right-width: 0px;
border-top-color: rgb(255, 255, 255);
border-top-style: solid;
border-top-width: 0px;
color: rgb(255, 255, 255);
cursor: pointer;
font-family: "Trebuchet MS";
font-size: 11px;
height: 32px;
text-align: center;
text-shadow: 0px 1px 0px;
width: 68px;
 }
 .oranj { 
color: rgb(242, 105, 34) !important;
 }
 

 
</style>
    <body>
        
    <? 
 
            foreach ($shares as $item): ?>
	      <div class="item">
	        <div class="gray_block">
	          <div class="tovarpic"> 
	          	<a href="<?= $url.'/cuppons/'.$item->id ?>" class=" tovarlink" >
	          		<?= $item->name; ?>
	          	</a> 

	          	<?php 
                        $this->widget('application.modules.pictures.components.PicturesEditor',
					array(
					'model'=>$item,
					'mode'=>'cupponsIndex',
					'width'=>300,
						'height'=>219
					)
						  );
                        ?>
	          </div>
	          
	          <div class="tovarinfo">
	          
	            <div >
	            	<span class="sz11 gray">Успей купить:</span><br>
	            	<span class="sz17"><strong>1 день 07:58:15</strong></span>
	            </div>
	           	<div>
	           		<span class="sz11 gray">Наша цена:</span><br>
	              <span class="sz17"><strong><?= $addModel[$item->id]->price_out; ?> <?= $addModel[$item->id]->price_out_pf; ?></strong></span> </div>
	            <div>
				<form action="<?= $url.'/cuppons/buy/'.$item->id ?>">
	              <input type="submit" value="Купить" class="oranj_btn3">
				  </form>
	            </div>
	          </div>
	           <div class="tovarinfo1">
	            <div style="float:left">
	            	<span class="sz11 gray">Куплено</span>
	            	<span class="oranj"><?= $item->bought_cuppon_count ? $item->bought_cuppon_count : "0";?></span>
	            </div>
	           	<div style="float:right">
	           		<span class="sz11 gray">Отзывы</span> <a href="<?= $url.'/cuppons/'.$item->id ?>#comments"><?=$addModel[$item->id]->commentsCount;?></a></div>
	          </div>
	        </div>
	      </div>
	    <? endforeach; ?>
